<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>用户登录-爱旅网</title>

    <!-- <link rel="stylesheet" type="text/css" href="{S_URL}/templates/$_SCONFIG[template]/css/stylea.css" /> -->
    <!-- <link rel="stylesheet" type="text/css" href="{S_URL}/templates/$_SCONFIG[template]/css/logina.css" /> -->
    <script type="text/javascript" src="http://www.lovetrival.com/Public/js/jquery.min.js"></script>
</head>
<style>
.login-top .tbb{ font-size:18px; font-weight:bold; position:absolute; bottom:0; left:195px; color:#FFD200;}
*{ margin:0px; padding:0px; list-style-type:none;
}
/*gai bian xuan zhong yan se */
::selection{background-color:rgba(90, 247, 253, 0.2);color:#333}
::-moz-selection{background-color:rgba(90, 247, 253, 0.2);color:#333}
::-webkit-selection{background-color:rgba(90, 247, 253, 0.2);color:#333}
body{  
    padding:0;
    margin:0; line-height:24px; /*ie*/*line-height:normal; color:#333; font-size:12px; font-family:"微软雅黑"/*,"Microsoft YaHei"*/; font-size:12px; vertical-align:bottom;
    }
img{
    border:0px;
}
.clear {
    clear:both;
}
.login-content ul li button {
width:100%;
height: 49px;
background-color:#FFD200;
font-size: 20px;
color: #fff;
cursor: pointer; border:solid 1px #fff;
}
.login-content ul li.pwd label {
background: url(http://www.lovetrival.com/Public/Img/sprite_user.png) no-repeat -113px -25px;
}
/*login*/
.icon-home{ padding:0px 5px; border:solid 1px #4A5460; color:#4A5460; background:#fff;}
.warning{ min-width:10px; height:25px; display: inline-block;}

/*login-agent*/
.login-agent{width:550px; height:550px; border-radius:5px; position:absolute; left:50%; top:50%; margin-left:-275px; margin-top:-275px; box-shadow: 0 1px 14px rgba(0,0,0,0.3);}
.login-agent .login-top{position:relative; z-index:3; padding:25px 35px 30px 30px;}
.login-agent .icon-home{ position:absolute; top:70px; right:40px;}
/*content*/
.login-content{ padding:40px; position:relative; z-index:3;}

.login-content ul li {
width: 475px;
line-height: 45px;
color: #555;
font-size: 14px;
margin-bottom: 20px;}
.login-content ul li .li-bg {
position: relative;
}
.login-content ul li .li-bg label {
width: 14px;
height: 19px;
display: inline-block;
position: absolute;
left: 15px;
top: 15px;
}
.login-content ul li.user-jobnum label { width:18px; left:12px;
background: url(http://www.lovetrival.com/Public/Img/sprite_user.png) no-repeat -133px 0;
}
.login-content ul li.user-phone label {
background: url(http://www.lovetrival.com/Public/Img/sprite_user.png) no-repeat -113px 0;
}
.login-content ul li .li-bg input {
height: 45px;
width: 410px;
line-height: 45px;
vertical-align: middle;
border: 1px solid #e3e3e3;
padding: 0 15px 0 45px;
color: #999;
font-size: 14px;
background: #fff;
}
.loginorregis{color:#453A3E;margin:0px;width:175px;height:64px;font-size:18px;text-align:center;line-height:64px;float:left;}
.bottomcolor{border-bottom:2px solid #6AA3C1;}
.loginorregisdiv{display: none;}
.displayshow{display: block;}
</style>
<body>
<div style='height:100px;'>
    <!-- <div style='margin-top:40px;margin-left:20%;'> -->
        <img src="http://www.lovetrival.com/Public/Img/logo2.png" style='width:150px;height:60px;margin-top:40px;margin-left:10%;'>
    <!-- </div> -->
    <div style='float:right;margin-top:48px;margin-right:70%;font-size:18px;'></div>

</div> 
<div style='background-image:url("http://www.lovetrival.com/Public/Img/timg.jpg");height:450px;width:100%;position:relative;'>
    <div style='float:left;margin-left:20%;margin-top:4%;' >
        <!-- <img src="{S_URL}/templates/$_SCONFIG[template]/barbecue/img/loginlogo.png" style='width:330px;height:330px;'> -->
    </div>
    <div style='width:350px;height:350px;background:#EDF1F5;float:right;margin-right:20%;margin-top:3%;box-shadow:#666 0px 0px 20px;'>
        <div class="login-top" style="padding-bottom:0;">
            <!-- <div style=" height:75px;text-align:center;"> --><!--<img style=" height:65px; float:left; margin-top:18px;" src="{S_URL}/templates/$_SCONFIG[template]/images/logo-c.png" />-->
                <div style='margin:0px;width:350px;height:64px;font-weight:bold;text-align:center;'>
                    <div class='loginorregis' style=''>账户登陆</div>
                    <div class='loginorregis'>用户注册</div>
                </div>
            <!-- </div> -->
        </div>
        <!-- <div style='height:1px;width:100%;background:#DEDCDD;'>
            <div style='background:#6AA3C1;height:3px;width:80%;margin:0px auto 0 auto;'></div>
        </div> -->
        <div style='width:100%;overflow:auto;'>
            <div class='loginorregisdiv' style='position:absolute;width:40%;'>
                <form method="post" id="agent_login" name="login" action="{:U('Index/Pcloginentry')}" >
                    <input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
                    <div class="login-content">

                        <ul class="user-logn">
                            <li class="user-jobnum" style='width:100%;margin-bottom:0px;'>
                                <div class="li-bg error"  style='width:100%;'>
                                    <label></label>
                                    <input type="text" id="username" name="username" placeholder="请输入账号" value="" validate="" validatename="工号" class="phonecode"  style='width:40%;padding-right:0px;background:#EDF1F5;height:40px;border:2px solid balck;border-radius:4px;'/>
                                     <span id="checkusername" class="warning"></span>
                                </div>
                            </li>
                            <li class="pwd"  style='width:100%;margin-bottom:0px;'>
                                <div class="li-bg "  style='width:100%;'>
                                    <label></label>
                                    <input type="password" id="admin_password" name="password" class="pwd" placeholder="请输入密码" validate="" validatename="密码"  style='border:2px solid balck;width:40%;padding-right:0px;background:#EDF1F5;height:40px;border-radius:4px;'>
                                     <span id="checkpassword" class="warning"></span>
                                </div>
                            </li>
                          
                            <li class="pwd"  style='width:100%;margin-bottom:0px;'>
                                <div class="left" style='float:right;'>
                                    <a href="#" class="right" style='color:#555;text-decoration:none;'>找回密码</a>
                                </div>
                            </li>
                            <li style="margin-top:60px;width:100%;">
                                <button type="submit" name="dologinbtn" style='background:#6AA3C1;border-radius:4px;height:35px;width:50%;' class="actLogin" >立即登录</button>
                            </li>
                        </ul>
                    </div>
                    <input type="hidden" name="dologin" value="yes" />
                </form>
            </div>


            <div class='loginorregisdiv' style='position:absolute;width:40%;overflow:auto;'>
                <form method="post" id="agent_register" name="login" action="{:U('Index/register')}" >
                    <div class="login-content">

                        <ul class="user-logn">
                            <li class="user-jobnum" style='width:100%;margin-bottom:0px;'>
                                <div class="li-bg error"  style='width:100%;'>
                                    <label></label>
                                    <input type="text" name="regisusername" placeholder="请输入账号" value="" validate="" validatename="工号" class="phonecode"  style='width:40%;padding-right:0px;background:#EDF1F5;height:40px;border:2px solid balck;border-radius:4px;'/>
                                     <span id="checkusername" class="warning"></span>
                                </div>
                            </li>
                            <li class="pwd"  style='width:100%;margin-bottom:0px;'>
                                <div class="li-bg "  style='width:100%;'>
                                    <label></label>
                                    <input type="password" name="regispassword" class="pwd" placeholder="请输入密码" validate="" validatename="密码"  style='border:2px solid balck;width:40%;padding-right:0px;background:#EDF1F5;height:40px;border-radius:4px;'>
                                     <span id="checkpassword" class="warning"></span>
                                </div>
                            </li>

                            <li class="pwd"  style='width:100%;margin-bottom:0px;'>
                                <div class="li-bg "  style='width:100%;'>
                                    <label></label>
                                    <input type="password" name="reregispassword" class="pwd" placeholder="请确认密码" validate="" validatename="密码"  style='border:2px solid balck;width:40%;padding-right:0px;background:#EDF1F5;height:40px;border-radius:4px;'>
                                     <span id="checkpassword" class="warning"></span>
                                </div>
                            </li>
                          
                            
                            <li style="margin-top:60px;width:100%;">
                                <button type="submit" name="regisdologinbtn" style='background:#6AA3C1;border-radius:4px;height:35px;width:50%;' class="actLogin">注册</button>
                            
                            </li>
                        </ul>
                    </div>
                    <input type="hidden" name="dologin" value="yes" />
                </form>
            </div>
        </div>
    </div>
</div>
<div style="text-align:center;margin-top:20px;">
    <p>18710489712</p>
    <p>M18710489712@163.com</p>
    <p>陕ICP备18010771号</p>
</div>

</body>
</html>
<script>
    if("{$info['success']}"!='0'){
        alert("{$info['msg']}");
    }
    $(function(){
        $('.loginorregis:eq("{$index}")').addClass('bottomcolor');
        $('.loginorregisdiv:eq("{$index}")').addClass('displayshow');


        $('.loginorregis').on('click',function(){
            // console.log($(this).index());
            var indexnow=$(this).index();
            $('.loginorregis:eq('+indexnow+')').addClass('bottomcolor').siblings('.loginorregis').removeClass('bottomcolor');
            $('.loginorregisdiv:eq('+indexnow+')').addClass('displayshow').siblings('.loginorregisdiv').removeClass('displayshow');
        });



        $('button[type=button]').on('click',function(){
            // console.log('nihao');
            var data=new FormData($('#agent_login')[0]);
            // console.log(data);return;
            $.ajax({
                url:"{:U('Index/Pcloginentry')}",
                data:data,
                type:'post',
                dataType:'json',
                processData:false,
                contentType:false,
                success:function(data){
                    if(data['success']=='1'){
                        $('#agent_login').attr({'action':"{:U('Index/Pcloginentry')}",'method':'post'});
                        alert(data['msg']);
                    }else if(data['msg']=='0'){

                    }
                }
            })
        });



        $('form[id=agent_register] input[name=reregispassword]').on('blur',function(){
            var regispassword=$('form[id=agent_register] input[name=regispassword]').val();
            var reregispassword=$(this).val();
            if(regispassword!=reregispassword){
                alert('两次密码必须一致!');
                $('button[name=regisdologinbtn]').css({'background':'#444'}).attr('disabled',true);
            }else{
                $('button[name=regisdologinbtn]').css({'background':'#6AA3C1'}).attr('disabled',false);
            }
        })
    })

   
</script>